package com.test.restruant.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.test.restruant.pojo.Table;
import com.test.restruant.service.TableService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 徒有琴
 */
@RestController
public class TableController {
    @Reference
    private TableService tableService;

    @RequestMapping("table.html")
    public List<Table> tableList() {
        return tableService.getTableList();
    }
}
